﻿using Abp.Application.Services;
using App.BaseObject;
using App.Configuration.Dto;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace App.Configuration
{
    public interface ISettingsAppService : IApplicationService
    {
        Task<SettingsDto> GetAllSettings();

        Task UpdateAllSettings(SettingsDto input);

        Task SendTestEmail(string toEmail);

        /// <summary>
        /// 保存按钮
        /// </summary>
        /// <param name="bulks"></param>
        /// <returns></returns>
        Task SaveButtons(BulkDto<ButtonDto> bulks);
        /// <summary>
        /// 获取所有按钮
        /// </summary>
        /// <returns></returns>
        Task<List<Button>> GetAllButton();

        /// <summary>
        /// 获取菜单功能
        /// </summary>
        /// <returns></returns>
        Task<List<MenuPermission>> GetAllMenuPermissions();

        /// <summary>
        /// 创建菜单
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<MenuPermission> CreateMenu(MenuPermissionDto dto);

        /// <summary>
        /// 修改菜单
        /// </summary>
        /// <param name="id"></param>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task UpdateMenu(int id, MenuPermissionDto dto);

        /// <summary>
        /// 保存菜单对应按钮
        /// </summary>
        /// <param name="id"></param>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task SaveMenuButtons(int id, BulkKeyDto<int> dto);
    }
}
